<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/business/buyer/template.xhtml">
   
   	<f:metadata>
	   	<f:viewParam name="tradeRatingId" value="#{tradeRatingHome.id}" required="true"></f:viewParam>
	   	<f:event listener="#{additionalTradeRatingHome.initConversation()}" type="preRenderView"></f:event>	   	
   	</f:metadata>
   	
   	<ui:define name="buyer_head">
   	
   		<style type="text/css">
			.column1 {
				width: 20%
			}
			
			.column2 {
				width: 80%				
			}
		</style>
   	
   	</ui:define>
   	
	<ui:define name="buyer_content">

		<h:form id="editForm">
			
			<p:panel>
				<h:panelGrid columns="2"
					columnClasses="column1, column2">
					<p:outputLabel value="评分:" />
					<h:outputText value="#{tradeRatingHome.instance.score}" />
					<p:outputLabel value="服务质量："></p:outputLabel>
					<h:outputText value="#{tradeRatingHome.instance.quality}" style="margin-left: 10px;" />

					<p:outputLabel value="服务时效："></p:outputLabel>
					<h:outputText value="#{tradeRatingHome.instance.effectiveness}" style="margin-left: 10px;" />

					<p:outputLabel value="服务态度："></p:outputLabel>
					<h:outputText value="#{tradeRatingHome.instance.attitude}" style="margin-left: 10px;" />

					<p:outputLabel value="服务收费："></p:outputLabel>
					<h:outputText value="#{tradeRatingHome.instance.charge}" style="margin-left: 10px;" />

					<p:outputLabel value="服务标准："></p:outputLabel>
					<h:outputText value="#{tradeRatingHome.instance.standard}" style="margin-left: 10px;" />

				</h:panelGrid>
			</p:panel>
		
			<p:panel
				id="panel"
				header="追加评价"
				style="margin-bottom:10px;">
				<p:messages
					id="messages"
					closable="true">
					<p:autoUpdate />
				</p:messages>
				<h:panelGrid
					columns="2"
					cellpadding="5"
					columnClasses="column1, column2">
					
					<p:outputLabel value="评价内容" />
					<p:inputTextarea
						id="charge"
						value="#{additionalTradeRatingHome.instance.content}"
						required="true"
						placeholder="对评价进行补充，更客观、更全面"
						cols="80"
						rows="5"></p:inputTextarea>

				</h:panelGrid>

			</p:panel>

			<p:commandButton
				value="发布评价"
				action="#{additionalTradeRatingHome.saveAndFlush()}" />
			<p:button outcome="SuccessBulletinList.xhtml" value="取消"></p:button>
		</h:form>

	</ui:define>
</ui:composition>
